package com.oneandseven.dajia.bean;

public enum WorkStatusEnum {
    UPLOADED("uploaded", "已上传"),
    REVIEWED("reviewed", "已批改"),
    FAILED("failed", "批改失败");

    private final String code;
    private final String name;


    WorkStatusEnum(String number, String reviewed) {
        this.code = number;
        this.name = reviewed;
    }
    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static WorkStatusEnum getWorkStatusEnum(String code) {
        for (WorkStatusEnum workStatusEnum : WorkStatusEnum.values()) {
            if (workStatusEnum.getCode().equals(code)) {
                return workStatusEnum;
            }
        }
        return null;
    }
}
